<form name="contractEditProductForm" class="form-horizontal" novalidate style="width:800px;height:450px;overflow-y:auto;">
      <div class="form-group mt10 clearfix">
            <span class="col-sm-9 control-label">产品名称</span>
            <div class="col-sm-9">
                  <input select2 required ng-model="data.application_id" name="application_id" select2-model="ddl2Project" config="ddlConfigProjects"
                        ng-disabled="cannotEdit" class="form-control" type="text" placeholder="产品名称" />
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.application_id.$touched) && contractEditProductForm.application_id.$error.required"
                        class="error ng-hide c-red lh30">请选择产品名称</span>
            </div>
      </div>
      <div class="form-group mt10 clearfix" ng-if="data.application_id=='other'">
            <span class="col-sm-9 control-label">产品明细</span>

            <div class="col-sm-9">
                  <input select2 required ng-model="data.other_application_id" name="other_application_id" select2-model="ddl2OtherProject"
                        ng-disabled="cannotEdit" config="ddlConfigOtherProjects" class="form-control" type="text" placeholder="产品明细"
                  />
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.other_application_id.$touched) && contractEditProductForm.other_application_id.$error.required"
                        class="error ng-hide c-red lh30">请选择产品明细</span>
            </div>
      </div>

      <div class="form-group mt10 clearfix" ng-if="(data.authorization_type==0 || data.authorization_type==1) && data.is_simple!=1">
            <span class="col-sm-4 control-label">标准单价</span>

            <div class="col-sm-8" ng-if="data.authorization_type==0 && data.application_id!='other'">
                  <input type="number" ng-disabled="true" ng-model="data.price" class="form-control" id="inputPrice" placeholder="标准单价">
            </div>
            <div class="col-sm-8" ng-if="data.authorization_type==0 && data.application_id=='other'">
                  <input type="number" ng-model="data.price" class="form-control" id="inputPrice" ng-disabled="cannotEdit" placeholder="标准单价">
            </div>
            <div class="col-sm-8" ng-if="data.authorization_type==1">
                  <input select2 ng-model="data.price" required name="price" select2-model="ddl2SMSPrice" config="ddlConfigSMSPrice" class="form-control"
                        ng-disabled="cannotEdit" type="text" placeholder="标准单价" />
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.price.$touched) && contractEditProductForm.price.$error.required"
                        class="error ng-hide c-red lh30">标准单价不能为空</span>
            </div>
            <span class="col-sm-4 control-label" ng-if="data.authorization_type==0 && data.is_simple!=1">产品数</span>
            <div class="col-sm-8" ng-if="data.authorization_type==0 && data.is_simple!=1">
                  <input type="number" ng-model="data.authorization_numeric" required number min="1" name="authorization_numeric" class="form-control"
                        ng-disabled="cannotEdit" id="inputNumber" placeholder="项目数">
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.authorization_numeric.$touched) && contractEditProductForm.authorization_numeric.$error.required"
                        class="error ng-hide c-red lh30">产品数不能为空</span>
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.authorization_numeric.$touched) && contractEditProductForm.authorization_numeric.$error.number"
                        class="error ng-hide c-red lh30">产品数必须是数值类型</span>
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.authorization_numeric.$touched) && contractEditProductForm.authorization_numeric.$error.min"
                        class="error ng-hide c-red lh30">产品数必须大于0</span>
            </div>
            <span class="col-sm-4 control-label" ng-if="data.authorization_type==1">短信条数</span>
            <div class="col-sm-8" ng-if="data.authorization_type==1">
                  <input type="number" ng-model="data.authorization_numeric" required number min="1" name="authorization_numeric" class="form-control"
                        ng-disabled="cannotEdit" id="inputSmsNumber" placeholder="短信条数">
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.authorization_numeric.$touched) && contractEditProductForm.authorization_numeric.$error.required"
                        class="error ng-hide c-red lh30">短信条数不能为空</span>
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.authorization_numeric.$touched) && contractEditProductForm.authorization_numeric.$error.number"
                        class="error ng-hide c-red lh30">短信条数必须是数值类型</span>
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.authorization_numeric.$touched) && contractEditProductForm.authorization_numeric.$error.min"
                        class="error ng-hide c-red lh30">短信条数必须大于0</span>
            </div>
      </div>

      <div class="form-group mt10 clearfix" ng-if="data.authorization_type==0 && data.is_simple!=1">
            <span class="col-sm-4 control-label">租用周期(月)</span>

            <div class="col-sm-8">
                  <input type="number" ng-model="data.rent_period" required number min="1" name="rent_period" class="form-control" id="inputPeriod"
                        ng-disabled="cannotEdit" placeholder="租用周期(月)">
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.rent_period.$touched) && contractEditProductForm.rent_period.$error.required"
                        class="error ng-hide c-red lh30">租用周期不能为空</span>
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.rent_period.$touched) && contractEditProductForm.rent_period.$error.number"
                        class="error ng-hide c-red lh30">租用周期必须是数值类型</span>
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.rent_period.$touched) && contractEditProductForm.rent_period.$error.min"
                        class="error ng-hide c-red lh30">租用周期必须大于0</span>

            </div>
      </div>
      <div class="form-group mt10 clearfix" ng-if="data.authorization_type==0 || data.authorization_type==1">
            <span class="col-sm-4 control-label">标准金额</span>

            <div class="col-sm-8">
                  <input type="number" required number min="0" ng-model="data.amount" name="amount" class="form-control" id="inputAmount" ng-disabled="cannotEdit || (data.authorization_type==0 || data.price==0) && data.is_simple!=1"
                        placeholder="标准金额">

                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.amount.$touched) && contractEditProductForm.amount.$error.required"
                        class="error ng-hide c-red lh30">标准金额不能为空</span>
                  <span role="alert" ng-show=" contractEditProductForm.amount.$error.number" class="error ng-hide c-red lh30">标准金额必须是数值类型</span>
                  <span role="alert" ng-show=" contractEditProductForm.amount.$error.min" class="error ng-hide c-red lh30">标准金额必须大于等于0</span>
            </div>
      </div>
      <div class="form-group mt10 clearfix" ng-if="data.authorization_type==1 || data.authorization_type==0">
            <span class="col-sm-4 control-label">合同属性</span>
            <div class="col-sm-8">
                  <input select2 ng-model="data.contract_type" required name="contract_type" select2-model="ddl2ContractType" config="ddlConfigContractType"
                        ng-disabled="cannotEdit" class="form-control" type="text" placeholder="合同属性" />
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.contract_type.$touched) && contractEditProductForm.contract_type.$error.required"
                        class="error ng-hide c-red lh30">合同属性不能为空</span>
            </div>
            <span class="col-sm-4 control-label">结算类型</span>
            <div class="col-sm-8">
                  <input select2 ng-model="data.settlement_type" required name="settlement_type" select2-model="ddl2SettlementType" config="ddlConfigSettlementType"
                        ng-disabled="cannotEdit" class="form-control" type="text" placeholder="结算类型" />
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.settlement_type.$touched) && contractEditProductForm.settlement_type.$error.required"
                        class="error ng-hide c-red lh30">结算类型不能为空</span>
            </div>
      </div>
      <div class="form-group mt10 clearfix" ng-if="data.authorization_type==1 || data.authorization_type==0">
            <span class="col-sm-4 control-label">结算比例(%)</span>
            <div class="col-sm-8">
                  <input type="number" required number min="0" ng-model="data.settlement_scale" name="settlement_scale" class="form-control"
                        ng-disabled="cannotEdit" placeholder="结算比例" />
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.settlement_scale.$touched) && contractEditProductForm.settlement_scale.$error.required"
                        class="error ng-hide c-red lh30">结算比例不能为空</span>
                  <span role="alert" ng-show=" contractEditProductForm.settlement_scale.$error.number" class="error ng-hide c-red lh30">结算比例必须是数值类型</span>
                  <span role="alert" ng-show=" contractEditProductForm.settlement_scale.$error.min" class="error ng-hide c-red lh30">结算比例必须大于等于0</span>
            </div>
            <span class="col-sm-4 control-label" ng-if="data.settlement_type==2">折扣(%)</span>
            <div class="col-sm-8" ng-if="data.settlement_type==2">
                  <input type="number" required number min="0" ng-model="data.discount" name="discount" class="form-control" placeholder="折扣"
                        ng-disabled="cannotEdit" />
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.discount.$touched) && contractEditProductForm.discount.$error.required"
                        class="error ng-hide c-red lh30">折扣不能为空</span>
                  <span role="alert" ng-show=" contractEditProductForm.discount.$error.number" class="error ng-hide c-red lh30">折扣必须是数值类型</span>
                  <span role="alert" ng-show=" contractEditProductForm.discount.$error.min" class="error ng-hide c-red lh30">折扣必须大于等于0</span>
            </div>
      </div>
      <div class="form-group mt10 clearfix" ng-if="data.authorization_type==1 || data.authorization_type==0">
            <span class="col-sm-4 control-label">原结算分摊金额</span>
            <div class="col-sm-8">
                  <input type="number" required number min="0" ng-model="data.origin_settlement_average_amount" name="origin_settlement_average_amount"
                        ng-disabled="cannotEdit" class="form-control" placeholder="原结算分摊金额" />
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.origin_settlement_average_amount.$touched) && contractEditProductForm.origin_settlement_average_amount.$error.required"
                        class="error ng-hide c-red lh30">原结算分摊金额不能为空</span>
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.origin_settlement_average_amount.$touched) && contractEditProductForm.origin_settlement_average_amount.$error.min"
                        class="error ng-hide c-red lh30">原结算分摊金额必须大于等于0</span>
            </div>
            <span class="col-sm-4 control-label">结算调整金额</span>
            <div class="col-sm-8">
                  <input type="number" required number min="0" ng-model="data.adjust_settlement_average_amount" name="adjust_settlement_average_amount"
                        ng-disabled="cannotEdit" class="form-control" placeholder="结算调整金额" />
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.adjust_settlement_average_amount.$touched) && contractEditProductForm.adjust_settlement_average_amount.$error.required"
                        class="error ng-hide c-red lh30">结算调整金额不能为空</span>
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.adjust_settlement_average_amount.$touched) && contractEditProductForm.adjust_settlement_average_amount.$error.min"
                        class="error ng-hide c-red lh30">结算调整金额必须大于等于0</span>
            </div>
      </div>
      <div class="form-group mt10 clearfix" ng-if="data.authorization_type==1 || data.authorization_type==0">
            <span class="col-sm-4 control-label">结算分摊金额</span>
            <div class="col-sm-8">
                  <input type="number" required number min="0" ng-model="data.settlement_average_amount" name="settlement_average_amount" class="form-control"
                        ng-disabled="cannotEdit" placeholder="结算分摊金额" />
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.settlement_average_amount.$touched) && contractEditProductForm.settlement_average_amount.$error.required"
                        class="error ng-hide c-red lh30">结算分摊金额不能为空</span>
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.settlement_average_amount.$touched) && contractEditProductForm.settlement_average_amount.$error.min"
                        class="error ng-hide c-red lh30">结算分摊金额必须大于等于0</span>
            </div>
      </div>
      <div class="form-group mt10 clearfix" ng-if="data.authorization_type==1 || data.authorization_type==0">
            <span class="col-sm-4 control-label">原产品租金分摊金额</span>
            <div class="col-sm-8">
                  <input type="number" required number min="0" ng-model="data.origin_product_average_amount" name="origin_product_average_amount"
                        class="form-control" placeholder="原产品租金分摊金额" />
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.origin_product_average_amount.$touched) && contractEditProductForm.origin_product_average_amount.$error.required"
                        class="error ng-hide c-red lh30">原产品租金分摊金额不能为空</span>
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.origin_product_average_amount.$touched) && contractEditProductForm.origin_product_average_amount.$error.min"
                        class="error ng-hide c-red lh30">原产品租金分摊金额必须大于0</span>
            </div>
            <span class="col-sm-4 control-label">产品租金调整金额</span>
            <div class="col-sm-8">
                  <input type="number" required number min="0" ng-model="data.adjust_product_average_amount" name="adjust_product_average_amount"
                        class="form-control" placeholder="产品租金调整金额" />
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.adjust_product_average_amount.$touched) && contractEditProductForm.adjust_product_average_amount.$error.required"
                        class="error ng-hide c-red lh30">产品租金调整金额不能为空</span>
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.adjust_product_average_amount.$touched) && contractEditProductForm.adjust_product_average_amount.$error.min"
                        class="error ng-hide c-red lh30">产品租金调整金额必须大于等于0</span>
            </div>
      </div>
      <div class="form-group mt10 clearfix" ng-if="data.authorization_type==1 || data.authorization_type==0">
            <span class="col-sm-4 control-label">产品租金分摊金额</span>
            <div class="col-sm-8">
                  <input type="number" required number min="0" ng-model="data.product_average_amount" name="product_average_amount" class="form-control"
                        placeholder="产品租金分摊金额" />
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.product_average_amount.$touched) && contractEditProductForm.product_average_amount.$error.required"
                        class="error ng-hide c-red lh30">产品租金分摊金额不能为空</span>
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.product_average_amount.$touched) && contractEditProductForm.product_average_amount.$error.min"
                        class="error ng-hide c-red lh30">产品租金分摊金额必须大于0</span>
            </div>
      </div>
      <div class="form-group mt10 clearfix" ng-if="data.authorization_type==1 || data.authorization_type==0">
            <span class="col-sm-4 control-label">原签约分摊金额</span>
            <div class="col-sm-8">
                  <input type="number" required number min="0" ng-model="data.origin_sign_average_amount" name="origin_sign_average_amount"
                        class="form-control" placeholder="原签约分摊金额" />
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.origin_sign_average_amount.$touched) && contractEditProductForm.origin_sign_average_amount.$error.required"
                        class="error ng-hide c-red lh30">原签约分摊金额不能为空</span>
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.origin_sign_average_amount.$touched) && contractEditProductForm.origin_sign_average_amount.$error.min"
                        class="error ng-hide c-red lh30">原签约分摊金额必须大于0</span>
            </div>
            <span class="col-sm-4 control-label">签约调整金额</span>
            <div class="col-sm-8">
                  <input type="number" required number min="0" ng-model="data.adjust_sign_average_amount" name="adjust_sign_average_amount"
                        class="form-control" placeholder="签约调整金额" />
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.adjust_sign_average_amount.$touched) && contractEditProductForm.adjust_sign_average_amount.$error.required"
                        class="error ng-hide c-red lh30">签约调整金额不能为空</span>
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.adjust_sign_average_amount.$touched) && contractEditProductForm.adjust_sign_average_amount.$error.min"
                        class="error ng-hide c-red lh30">签约调整金额必须大于0</span>
            </div>
      </div>
      <div class="form-group mt10 clearfix" ng-if="data.authorization_type==1 || data.authorization_type==0">
            <span class="col-sm-4 control-label">签约分摊金额</span>
            <div class="col-sm-8">
                  <input type="number" required number min="0" ng-model="data.sign_average_amount" name="sign_average_amount" class="form-control"
                        placeholder="签约分摊金额" />
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.sign_average_amount.$touched) && contractEditProductForm.sign_average_amount.$error.required"
                        class="error ng-hide c-red lh30">签约分摊金额不能为空</span>
                  <span role="alert" ng-show="(contractEditProductForm.$submitted || contractEditProductForm.sign_average_amount.$touched) && contractEditProductForm.sign_average_amount.$error.required"
                        class="error ng-hide c-red lh30">签约分摊金额必须大于0</span>
            </div>
      </div>
</form>
<div class="ui-dialog-footer">
      <div class="ui-dialog-button">
            <button type="button" ng-click="cancel()">取消</button>
            <button type="button" class="ui-dialog-autofocus" ng-click="ok()">确定</button>
      </div>
</div>